package com.jason.lightreader.exception;

import com.jason.lightreader.response.Code;

public class ServiceException extends RuntimeException {
    private final Code code;

    public ServiceException(Code code) {
        super(code.getMsg());
        this.code = code;
    }

    public ServiceException(Code code, String msg) {
        super(msg);
        this.code = code;
    }

    public Code getCode() {
        return code;
    }
}
